<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set value="${pageContext.request.contextPath}" var="path"
	scope="page" />
<script type="text/javascript" src="${path}/js/jquery-1.11.1.min.js"></script>
<!--发布招聘-->
<div class="main_tag">招聘模块管理>发布招聘</div>
<div class="sysm1_udiv">
	<div
		style="width: 98%; background: #F9F9F9; padding-top: 10px; padding-left: 20px;">
		<form>
		<table style="width: 99%" id="hiretable">
			<tr>
				<td style="width: 20%; padding-top: 10px; padding-bottom: 10px;">标题:</td>
				<td style="width: 45%"><input id="title" type="text" size="40" /></td>
				<td class="hirenote">标题最长40字符</td>
			</tr>
			<tr>
				<td style="width: 20%; padding-top: 10px; padding-bottom: 10px;">招聘企业:</td>
				<td><input id="enterprise" type="text" size="40" /></td>
				<td class="hirenote">企业名称最长40字符</td>
			</tr>
			<tr>
				<td style="width: 20%; padding-top: 10px; padding-bottom: 10px;">学历要求:</td>
				<td><select id="education">
						<option value="不限">不限</option>
						<option value="大专">大专</option>
						<option value="本科">本科</option>
						<option value="研究生">研究生</option>
				</select></td>
				<td class="hirenote">必选一个</td>
			</tr>
			<tr>
				<td style="width: 20%; padding-top: 10px; padding-bottom: 10px;">工作经验:</td>
				<td><select id="experience">
						<option value="0">不限</option>
						<option value="1">1年</option>
						<option value="2">2年</option>
						<option value="3">3年</option>
						<option value="5">5年</option>
				</select></td>
				<td class="hirenote">必选一个</td>
			</tr>
			<tr>
				<td style="width: 20%; padding-top: 10px; padding-bottom: 10px;">工作地区:</td>
				<td><input id="district" type="text" size="20" /></td>
				<td class="hirenote">工作的城市最长20字符</td>
			</tr>
			<tr>
				<td style="width: 20%; padding-top: 10px; padding-bottom: 10px;">职位描述:</td>
				<td><textarea id="describe" cols="40" rows="4"></textarea></td>
				<td class="hirenote">职位需求最长200字符</td>
			</tr>
			<tr>
				<td style="width: 20%; padding-top: 10px; padding-bottom: 10px;">工作要求:</td>
				<td><textarea id="requirement" cols="40" rows="6"></textarea></td>
				<td class="hirenote">工作需求最长200字符</td>
			</tr>
			<tr>
				<td colspan="3"><input type="button" value="发布招聘"
					onclick="doSubmit();" class="btn_posthire" /><input type="reset" style="display:none;"/></td>
					
			</tr>
		</table>
		</form>
	</div>
</div>
<script type="text/javascript">
	function doSubmit() {
		var title = $("#title").val();
		var enterprise = $("#enterprise").val();
		var education = $("#education").val();
		var experience = $("#experience").val();
		var district = $("#district").val();
		var describe = $("#describe").val();
		var requirement = $("#requirement").val();
		var url = "${pageContext.request.contextPath}/AddJobControoler";
		$.post(url, {
			title : title,
			enterprise : enterprise,
			education : education,
			experience : experience,
			district : district,
			descri : describe,
			require : requirement
		}, function(data) {
			if (data = "1") {
				alert("添加成功");
				$(":reset").click();
			} else {
				alert("未知原因，添加失败")
			}
		});
	}
</script>